package com.spb.SpringBootDemo.rest;

import com.alibaba.druid.filter.config.ConfigTools;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/greeting")
public class HelloWorldController {

	@RequestMapping("/sayHello")
	public String hello(){
		return "Hello,world!";
	}
	@RequestMapping("/test")
	public void mytest() throws Exception{

		String publicKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAITcCYxmqWPldRJkdL2s0gI7YJ2PHGWO8/1yzH0VpIBe1cHiiSnAAzsxFyBepdpouUcyP7YmocaLAz7kDDRAsEECAwEAAQ==";
		String password = "EJOdVKbuF1hTFKtkrihFnj4QpbSyAcMWd9qUPRMBJbPNiJxPFRuz6PaM00y50Aciqw8DzTlQKHWFy+bngwSSNQ==";

		System.out.println(ConfigTools.decrypt(publicKey, password));


	}
}
